home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Add-Ons / MPW / MPW re2c 1.1 / ins.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-06-01  |  636 b   |  47 lines  |  [TEXT/KAHL]

  1. #ifndef _ins_h
  2. #define _ins_h
  3.  
  4. // $Log: ins.h,v $
  5. //Revision 1.1  1994/04/08  15:27:59  peter
  6. //Initial revision
  7. //
  8.  
  9. #include <iostream.h>
  10. #include "basics.h"
  11.  
  12. const uint nChars = 256;
  13. typedef uchar Char;
  14.  
  15. const uint CHAR = 0;
  16. const uint GOTO = 1;
  17. const uint FORK = 2;
  18. const uint TERM = 3;
  19. const uint CTXT = 4;
  20.  
  21. union Ins {
  22.     struct {
  23.     byte    tag;
  24.     byte    marked;
  25.     void    *link;
  26.     }            i;
  27.     struct {
  28.     ushort    value;
  29.     ushort    bump;
  30.     void    *link;
  31.     }            c;
  32. };
  33.  
  34. inline bool isMarked(Ins *i){
  35.     return (bool) i->i.marked;
  36. }
  37.  
  38. inline void mark(Ins *i){
  39.     i->i.marked = true;
  40. }
  41.  
  42. inline void unmark(Ins *i){
  43.     i->i.marked = false;
  44. }
  45.  
  46. #endif
  47.